feat(admin): data-health check for unlinked artifacts (#649)#1370
Merged
Conversation
…649) Adds a read-only "Artifacts not linked to a project" Data Health check at /admin/data-health/ so the backlog of unlinked talks, papers, videos, and posters stays visible and shrinks over time instead of living in a one-off issue. - Excludes pre-Makeability-Lab work (date < settings.DATE_MAKEABILITYLAB_FORMED), reusing the same cutoff the publications view already applies. - Flags rows whose parent publication is already linked — those can simply inherit its projects (quickest wins). - Each row deep-links to the artifact's admin edit page to add the project inline; CSV export; strictly read-only. - Keeps data-health row-action buttons (e.g. "Open ->") from wrapping mid-word in a narrow column (shared detail.html style; also helps existing checks). Regression-tested in website/tests/test_unlinked_artifacts_check.py. Scope and a deferred semi-automated matching pipeline are documented in docs/plans/issue-649-link-artifacts-to-projects.md. Bumps version to 2.17.1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #649.
What & why
As the lab keeps adding projects, older talks/papers/videos/posters need to be linked back to the projects they belong to. Rather than a one-off data-entry sprint that silently rots, this adds a read-only Data Health check so the backlog stays visible and shrinks over time.
Scope (from a prod snapshot, 2026-06-14): 197 artifacts have no project; 81 are pre-2012 (pre-Makeability-Lab grad work) and excluded, leaving 116 actionable. ~25 of those are children of an already-linked publication and can simply inherit its projects.
The check (
/admin/data-health/→ "Artifacts not linked to a project")settings.DATE_MAKEABILITYLAB_FORMED(same cutoff the publications view uses)..save()).HealthCheckpattern.UI fix
Row-action buttons were wrapping mid-word in the narrow Action column. Added
white-space: nowrapto data-health row-action buttons in the shareddetail.html(also helps existing checks like "Merge in admin →"); table scrolls horizontally if needed. Shortened this check's label to "Open →".Before: the "Open & link →" button wrapped to two lines and overflowed the cell (see issue thread screenshot).
After: single-line "Open →" button, no wrap.
Tests
website/tests/test_unlinked_artifacts_check.py(6 cases): flagging, linked-artifact exclusion, pre-lab exclusion, parent-publication inherit note, orphan-no-note, and the admin deep-link. All pass:python manage.py test website.tests.test_unlinked_artifacts_check --settings=makeabilitylab.settings_testDeferred (not in this PR)
A semi-automated matching pipeline (suggest links via shared authors + keyword/title/date overlap → review CSV → bulk apply) is scoped in
docs/plans/issue-649-link-artifacts-to-projects.mdbut not built — author overlap alone is too ambiguous. Holding unless the manual route proves too slow.Bumps version to 2.17.1.
🤖 Generated with Claude Code